
<include file="Public/header"/><body>


	 
<div class="tab_nav tab_nav_none">
    <div class="header">
	<a href="javascript:void(0);" onClick="javascript:history.go(-1);" class="header_l"><i class="fa fa-angle-left"></i></a>
      <div class="h-mid">我的訂單   </div>
	<a href="{:U('Index/index')}" class="header_r"><i class="fa fa-home"></i></a>
	  
    </div>
</div>


<include file="Public/menu"/>

<div id="tbh5v0">
<!--------篩選 form 表單 開始-------------->

<div style="display: none;">
<form action="{:U('Mobile/Payment/getCode')}" method="post" name="cart4_form" id="cart4_form">
	<input type="radio" value="pay_code=weixin" checked="checked" name="pay_radio" />
	<input type="text" name="order_id" id="order_id" value="{$order['order_id']}" />
</form>
</div>
	
<form action="{:U('Mobile/order_list/ajax_order_list')}" name="filter_form" id="filter_form">  
      <div class="Evaluation2">
            <ul>
              <li><a href="{:U('/Mobile/User/order_list')}" class="tab_head <if condition="$_GET[type] eq ''">on</if>"  >全部</a></li>
              <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITPAY'))}"      class="tab_head <if condition="$_GET[type] eq 'WAITPAY'">on</if>">待付款</a></li>
              <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITSEND'))}"     class="tab_head <if condition="$_GET[type] eq 'WAITSEND'">on</if>">待發貨</a></li>
              <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITRECEIVE'))}"  class="tab_head <if condition="$_GET[type] eq 'WAITRECEIVE'">on</if>">待收貨</a></li>
              <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITCCOMMENT'))}" class="tab_head <if condition="$_GET[type] eq 'WAITCCOMMENT'">on</if>">已完成</a></li>
            </ul>
      </div>     
      
	<div class="order ajax_return">
	   <volist name="lists" id="list">
       <div class="order_list">
          <h2>
              <a href="javascript:void(0);">
                  <span>訂單號:{$list.order_sn}</span>
                  <strong><if condition="$list[order_status] eq 5"><b>已作廢</b></if>
                  <img src="__STATIC__/images/icojiantou1.png"></strong>
              </a>
          </h2>
         	<a href="{:U('/Mobile/User/order_detail',array('id'=>$list['order_id']))}">
	          <volist name="list.goods_list" id="good">
		          <dl style="position: relative">  
		          <dt><img src="{$good.goods_id|goods_thum_images=200,267}"></dt>
		          <dd class="name"><strong>{$good.goods_name}</strong>
		          <span style="position: absolute;">{$good.spec_key_name} </span></dd>
		          <dd class="pice">￥{$good['member_goods_price']}元<em>x{$good['goods_num']}</em></dd>
				 
                  
		          </dl>
	          </volist>
          	</a>
          <div class="pic">共{$list.goods_list|count}件商品<span>實付：</span><strong>￥{$list['order_amount']}元</strong></div>
          <div class="anniu" style="width:95%">
          
                	  
                          <!--<if condition="($list[return_btn] eq 1) and ($good[is_send] eq 1)">-->
                          	<!--<a href="{:U('Mobile/User/return_goods',array('order_id'=>$list[order_id],'order_sn'=>$list[order_sn],'goods_id'=>$good[goods_id],'spec_key'=>$good['spec_key']))}" >申請售後</a>-->
                          <!--</if>-->

              <if condition="$list.returnmoney_btn eq 1 and $list.return_order neq 1">
                  <a    href="{:U('Mobile/User/return_order',array('order_id'=>$list['order_id']))}" >申请退款</a>
              </if>
                  
                <if condition="$list.cancel_btn eq 1"><span onClick="cancel_order({$list.order_id})">取消訂單</span></if>
                <if condition="$list.pay_btn eq 1"><a  href="javascript:void();" onClick="gopayweixin({$list.order_id})" >立即付款</a>
               
                </if>
                <if condition="$list.receive_btn eq 1"><a href="{:U('Mobile/User/order_confirm',array('id'=>$list['order_id']))}">收貨確認</a></if>    
                <if condition="$list.comment_btn eq 1"><a href="{:U('/Mobile/User/comment')}">評價</a></if>
                <if condition="$list.shipping_btn eq 1"><a href="{:U('User/express',array('order_id'=>$list['order_id']))}">查看物流</a></if>
          </div>
       </div>
		</volist>  
    </div>
  <!--查詢條件-->
  <input type="hidden" name="type" value="<?php echo $_GET['type'];?>" />
</form>   
<notempty name="lists"> 
   <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem 2.4rem; clear:both">
  		<a href="javascript:void(0)" onClick="ajax_sourch_submit()">點擊加載更多</a>
  </div>         
</notempty>    
</div>


<include file="Public/footer_nav"/>
<script language="javascript">
var  page = 1;
 
 /*** ajax 提交表單 查詢訂單列表結果*/  
 function ajax_sourch_submit()
 {	 	
 		page += 1; 	 
		$.ajax({
			type : "GET",
			url:"/index.php?m=Mobile&c=User&a=order_list&type={$_GET['type']}&is_ajax=1&p="+page,//+tab,			
//			url:"{:U('Mobile/User/order_list',array('type'=>$_GET['type']),'')}/is_ajax/1/p/"+page,//+tab,			
			//data : $('#filter_form').serialize(),
			success: function(data)
			{
				if(data == '')
					$('#getmore').hide();
				else  
				{
					$(".ajax_return").append(data);			
					$(".m_loading").hide();
				}
			}
		}); 
 }
 
	 
//取消訂單
function gopayweixin(id){
		$('#order_id').val(id);
        $('#cart4_form').submit();
        return;
}
	
//取消訂單
function cancel_order(id){
	if(!confirm("確定取消訂單?"))
		return false;
	location.href = "/index.php?m=Mobile&c=User&a=cancel_order&id="+id;
}

</script>
</body>
</html>